package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/10/25.
 * Des:优惠券枚举
 */
public class LogisticsBusinessEnum {
    public enum Usingway {
        FRONT("前台可用", "1"),BACK("后台可用","2");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private Usingway(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (Usingway type : Usingway.values()) {
                if (type.getState().equals(state)) {
                    return type.getName();
                }
            }
            return "";
        }
    }


    public enum SendRange {
        INTAL("国际", "1"),INNER("国内","0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private SendRange(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (SendRange type : SendRange.values()) {
                if (type.getState().equals(state)) {
                    return type.getName();
                }
            }
            return "";
        }
    }




}
